﻿@{
    ViewBag.Title = "皮肤管理";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
@model List<UcAsp.Net.Model.Theme>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="widget-box">
            <div class="widget-title">
                <span class="icon"><i class="icon-signal"></i></span>
                <h5>当前Web皮肤</h5>
            </div>
            <div class="widget-content">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="span6 center">
                            <img  src="/themes/@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme/config/bigdefault.gif"/>


                        </div>
                        <div class="span4">
                            <span class="btn span4 btn-danger advset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme"><i class="icon-pencil icon-white"></i>广告位设置</span>
                            <a class="btn span4 btn-danger subjectset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme" href="/Admin/SubjectManage"><i class="icon-pencil icon-white"></i>主题设置</a>


                            <a class="btn span4 btn-danger categoriesset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.Theme" href="/Admin/CategoriesThemes"><i class="icon-pencil icon-white"></i>分类模板</a>

                        </div>
                    </div>
                </div>
            </div>
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-signal"></i></span>
                    <h5>当前Mobile皮肤</h5>
                </div>
                <div class="widget-content">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="span6 center">
                                <img  src="/themes/@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme/config/bigdefault.gif"/>


                            </div>
                            <div class="span4">
                                <span class="btn span4 btn-danger advset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme"><i class="icon-pencil icon-white"></i>广告位设置</span>
                                <a class="btn span4 btn-danger subjectset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme" href="/Admin/SubjectManage"><i class="icon-pencil icon-white"></i>主题设置</a>


                                <a class="btn span4 btn-danger categoriesset" data-id="@UcAsp.Net.BLL.SettingConfig.GetSiteSetting.MobileTheme" href="/Admin/CategoriesThemes"><i class="icon-pencil icon-white"></i>分类模板</a>

                            </div>
                        </div>
                    </div>
                </div>

            </div>
            @foreach (UcAsp.Net.Model.Theme t in Model)
            {
                <div class="span5 center" style="text-align: center;">
                    <img  src="/themes/@t.Path/config/@t.ImageUrl"/>
                    <br />
                    @t.Name  <span class="btn btn-danger savethemes" data-id="@t.Path"><i class="icon-pencil icon-white"></i>Web应用</span><span class="btn btn-danger savemobilethemes" data-id="@t.Path"><i class="icon-pencil icon-white"></i>Mobile应用</span>
                </div>
            }
        </div>
    </div>
    <script>
        $(function () {
            $(".advset").click(function () {
                $.get("/Admin/AdvManage?theme=" + $(this).attr("data-id"), function (dataResult) {
                    $.facebox(dataResult, "ucaspfacebox");
                });
            });
            $(".subjectset").click(function () {
                $.get("/Admin/SubjectManage?theme=" + $(this).attr("data-id"), function (dataResult) {
                    $.facebox(dataResult, "ucaspfacebox");
                });
            });
            $(".savethemes").click(function () {
                $.get("/Admin/SelectThemes?theme=" + $(this).attr("data-id"), function (dataResult) {
                    window.location = "/admin/ThemesManage";
                });
            });
            $(".savemobilethemes").click(function () {
                $.get("/Admin/SelectThemes?mobiletheme=" + $(this).attr("data-id"), function (dataResult) {
                    window.location = "/admin/ThemesManage";
                });
            });
        });
    </script>
